package com.xiaozhen.device.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xiaozhen.common.core.domain.device.Device;
import com.xiaozhen.common.core.domain.device.queryParams.DeviceQueryParam;
import com.xiaozhen.common.core.domain.driver.vo.ModbusDriverVo;

/**
 * HISTORY
 *
 * @author zhenweisheng
 * @date 2021/11/1 11:32
 * @description:
 */
public interface DeviceService {
    /**
     * 查询设备列表
     * @param queryParam
     * @param page
     * @return
     */
    Page<Device> selectDeviceList(Page<Device> page, DeviceQueryParam queryParam);

    /**
     * 查看设别名称是否存在
     * @param device
     * @return
     */
    Boolean checkDeviceNameUnique(Device device);

    /**
     * 添加设备
     * @param device
     * @return
     */
    Integer insertDevice(Device device);

    /**
     * 修改设备
     * @param device
     * @return
     */
    Integer updateDevice(Device device);

    /**
     * 删除设备
     * @param deviceId
     * @return
     */
    Integer deleteDeviceById(Long deviceId);

    ModbusDriverVo getModbusDeviceInfo(Long deviceId);
}
